package edu.tjut.tjutcommunity.entity;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author yhh
 * @since 2022-04-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Post对象", description = "")
public class Post implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "帖子id")
    @TableId(value = "pid", type = IdType.AUTO)
    private Integer pid;

    @ApiModelProperty(value = "贴主id")
    private Integer uid;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "首楼描述")
    private String description;

    @ApiModelProperty(value = "点赞数")
    private String likes;

    private String username;

    private String academyName;

    @ApiModelProperty(value = "楼层")
    private Integer floors;

    @ApiModelProperty(value = "帖子类别")
    private Integer type;

    @TableField (exist = false)
    //推荐种类，默认为null
    private Integer recommendType;

    private String pic1;
    @JsonIgnore
    private String pic2;
    @JsonIgnore
    private String pic3;
    @JsonIgnore
    private String pic4;
    @JsonIgnore
    private String pic5;
    @JsonIgnore
    private String pic6;
    @JsonIgnore
    private String pic7;
    @JsonIgnore
    private String pic8;
    @JsonIgnore
    private String pic9;

    @JsonIgnore
    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
